package com.feign;

import com.feign.client.UserClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * Created by
 *
 * @author touni
 * @date 2019/4/12
 * @time 17:21
 */
@RestController
public class FeignController {

    //@Resource(name = "userClient")
    @Autowired
    private UserClient userClient;

    @GetMapping("/user/{id}")
    public Object queryById(@PathVariable Integer id){

        return userClient.queryById(id);

    }




}
